package com.heima.e_commerce;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        ArrayList<Member> mlist = new ArrayList<>();
        ArrayList<Product> plist = new ArrayList<>();
        Member m1 = new Member("张三", 150);
        Product p1 = new Product("拖把", 15);
        Product p2 = new Product("肥皂", 15);
        mlist.add(m1);
        plist.add(p1);
        plist.add(p2);
        Order o1 = new Order(mlist,plist);
        o1.printInvoice();
        Payment cash = new CashPayment(plist);
        cash.pay();
        Payment creditCard = new CreditCardPayment(plist);
        creditCard.pay();
    }
}
